package com.freshdirect.src.dao;

import com.freshdirect.src.model.Product;
import java.util.List;
        
public interface ProductDAO {
    //Create
    public int save(Product product);
    //Read
    public Product getById(int id);
    //Update
    public void update(Product product);
    //Delete
    public void deleteById(int id);
    //Get All
    public List<Product> getAll();
    //Get by Group
    public List<Product> getProductsbyGroup(int id);

    public List<Product> searchProducts(String groups, String suppliers, String keywords);
    
    public List<Product> getMostPopularProducts();

    public List<Product> getSuggestedbyId(int id);

    public void updateQuantity(int id, int n);

    public void setDataSource(String admin);

    public String getAllGroups();

    public int findDegree(int prod1, int prod2);
}
